import http from '@/utils/request'

/**
 * @author hhl
 * @argument id:string
 * @description 创建SseEmitter
 * @callback 返回一个对象的结果
 * @requires true
 */
export const SseCreate = id => http.get(`api/sse/create/${id}`)

/**
 * @author hhl
 * @argument id:string,type:string
 * @description 启动SseEmitter
 * @callback 返回一个bealoon的结果
 * @requires true
 */
export const SseStart = (...{id,type})=> http.get(`api/sse/start/${id}/${type}`)

/**
 * @author hhl
 * @argument id:string,type:string
 * @description 停止SseEmitter
 * @callback 返回一个bealoon的结果
 * @requires true
 * @test 测试值 http://127.0.0.1:29090/api/sse/stop/92/6hd56d
 */
export const SseStop = (...{id,type})=> http.get(`api/sse/stop/${id}/${type}`)

/**
 * @author hhl
 * @argument id:string
 * @description 删除SseEmitter
 * @callback 返回一个bealoon的结果
 * @requires true
 * @test 测试值 http://127.0.0.1:29090/api/sse/stop/92/6hd56d
 */
export const SseRemove = id => http.get(`api/sse/stop/${id}`)
